#include "test.h"
#include "ScnsInclude.h"
#include "zf_common_headfile.h"

static void uartSend(void)
{
    hxPrintfFL("asjkhdhakjsdhajksdhkja\n");
}

static const ScnsTouchScreenButton mainPageButtons[]={
    {
        .key=SCNS_KEY_S1,
        .shape=SCNS_TOUCH_SCREEN_BUTTON_CIRCLE,
        .shapeData.circle={.plu={.x=240-40*3+40*2,.y=320-40*3+40},.r=40/2},
    },
    //{
    //    .key=SCNS_KEY_TOUCH_RIGHT,
    //    .shape=SCNS_TOUCH_SCREEN_BUTTON_RECTANGLE,
    //    .shapeData.rectangle={.plu={.x=1024-400+200,.y=600-400+100},.w=100,.h=100},
    //},
    {
        .key=SCNS_KEY_S2,
        .shape=SCNS_TOUCH_SCREEN_BUTTON_RECTANGLE,
        .shapeData.rectangle={.plu={.x=240-40*3+40*2,.y=320-40*3+0},.w=40,.h=40},
    },
    {
        .key=SCNS_KEY_S3,
        .shape=SCNS_TOUCH_SCREEN_BUTTON_RECTANGLE,
        .shapeData.rectangle={.plu={.x=240-40*3+40*2,.y=320-40*3+40*2},.w=40,.h=40},
    },
    //{
    //    .key=SCNS_KEY_TOUCH_DOWN,
    //    .shape=SCNS_TOUCH_SCREEN_BUTTON_RECTANGLE,
    //    .shapeData.rectangle={.plu={.x=1024-300+100,.y=600-300+200},.w=100,.h=100},
    //},
    //{
    //    .key=SCNS_KEY_TOUCH_CENTER,
    //    .shape=SCNS_TOUCH_SCREEN_BUTTON_CIRCLE,
    //    .shapeData.circle={.plu={.x=1024-300+100,.y=600-300+100},.r=50},
    //},
};

void test(void)
{
    scnsMenuAddFunction(0,uartSend);
    scnsMenuAddFunction(0,scnsTimerTest);
    
    scnsMenuSetPage(9,"test",NULL);
    scnsMenuAddTest(9,0XFFFF);
scnsMenuLoadAll();
    
    for(int i=0;i<(sizeof mainPageButtons)/(sizeof(mainPageButtons[0]));++i)
        scnsTouchScreenAddButton(&mainPageButtons[i]);
}
